<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd"> 
 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    <meta http-equiv="Content-Language "content="en-uk"> 
    <meta name="author" content=""> 
    <title>WMI Information</title> 
    <HTA:APPLICATION 
        APPLICATIONAME="WMI_Information" 
        BORDER="Thin" 
        BORDERSTYLE="Normal" 
        CAPTION="Yes" 
        CONTEXTMENU="Yes" 
        MAXIMIZEBUTTON="No" 
        MINIMIZEBUTTON="Yes" 
        SCROLL="Auto" 
        SCROLLFLAT="No" 
        SINGLEINSTANCE="Yes" 
        VERSION="1.0" 
        WINDOWSTATE="Normal" 
    > 
     
    /* Comment */ 
    <!-- 
        body {background-color: transparent; border-width: thin; font-family: Tahoma; font-size: 10pt; margin: 0pt;} 
        a.nav {color: #f8f8ff; font-family: Tahoma; font-size: 10pt; text-decoration: none;} 
        a.nav:active {color: #ffff00; text-decoration: none;} 
        a.nav:hover {color: #ffff00; text-decoration: underline;} 
        .tbl {border: 0; color: #000000; empty-cells: show; width: 100%;} 
        .division {background-color: transparent; margin: 0px 0px 0px 200px;} 
    -->     
     
</head> 
  
<body style="padding: 0pt;"> 
     <div style="position: fixed; top: 0pt; left: 0px; background-color: darkblue; 
    width: 100pt; height: 215pt; padding: 10pt;"> 
        <p><a class="nav" href="#" onclick="General_OnClick()">General Information</a></p> 
        <p><a class="nav" href="#" onclick="BIOS_OnClick()">BIOS</a></p> 
        <p><a class="nav" href="#" onclick="OS_OnClick()">Operating System</a></p> 
    </div> 
    <div style="margin: 0px 0px 0px 200px;    background-color: transparent; padding: 10px;"> 
        <div id="dataarea"></div> 
    </div> 
</body> 
 
<script language="VBScript"> 
    strComputerName = "." 
    Set objWMIService = GetObject("winmgmts:{ImpersonationLevel=impersonate}\\" & strComputerName & "\root\cimv2") 
    Function Window_OnLoad() 
        Window.ResizeTo 700, 350 
        General_OnClick() 
    End Function 
    Sub General_OnClick() 
        Set colItems = objWMIService.ExecQuery("Select * FROM Win32_ComputerSystem") 
        strHtm = "<table class=""tbl"">" 
        For Each objItem In colItems 
            strHtm = strHtm & "<tr><td>Computer Name</td><td>" & objItem.Name & "</td></tr>" 
            strHtm = strHtm & "<tr><td>Manufacturer</td><td>" & objItem.Manufacturer & "</td></tr>" 
            strHtm = strHtm & "<tr><td>Model</td><td>" & objItem.Model & "</td></tr>" 
        Next 
        Set ColSMBIOS = objWMIService.ExecQuery("Select * From Win32_SystemEnclosure") 
        For Each objSMBIOS in colSMBIOS 
            strHtm = strHtm & "<tr><td>Serial Number</td><td>" & objSMBIOS.SerialNumber & "</td></tr>" 
            strHtm = strHtm & "<tr><td>Asset Tag</td><td>" & objSMBIOS.SMBIOSAssetTag & "</td></tr></table>" 
        Next 
        dataarea.innerhtml = strHtm 
    End Sub 
    Sub BIOS_OnClick() 
        Set colBIOS = objWMIService.ExecQuery("Select * from win32_BIOS") 
        strHtm = "<table class=""tbl"">" 
        For each objBIOS in colBIOS 
            strHtm = strHtm & "<tr><td>Manufacturer</td><td>" & objBIOS.Manufacturer & "</td></tr>" 
            strHtm = strHtm & "<tr><td>Name</td><td>" & objBIOS.Name & "</td></tr>" 
            strHtm = strHtm & "<tr><td>Primary BIOS</td><td>" & objBIOS.PrimaryBIOS & "</td></tr>" 
            If Not IsNull (objBIOS.ReleaseDate) Then 
                strRelDate = fnDate(objBIOS.ReleaseDate) 
                strHtm = strHtm & "<tr><td>Release Date</td><td>" & strRelDate & "</td></tr>" 
            End If 
            strHtm = strHtm & "</table>" 
        Next 
        dataarea.innerhtml = strHtm 
    End Sub 
    Sub OS_OnClick() 
        Set colOSItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem") 
        strHtm = "<table class=""tbl"">" 
        For Each objOS in colOSItems 
            strHtm = strHtm & "<tr><td>System</td><td>" & objOS.Caption & "</td></tr>" 
            strHtm = strHtm & "<tr><td>Service Pack</td><td>" & objOS.ServicePackMajorVersion & "." & objOS.ServicePackMinorVersion & "</td></tr>" 
            strHtm = strHtm & "<tr><td>Version</td><td>" & objOS.Version & "</td></tr>" 
            If Not IsNull (objOS.FreePhysicalMemory) Then 
                intFreeMem = FnMemory(objOS.FreePhysicalMemory) 
                strHtm = strHtm & "<tr><td>Free Memory</td><td>" & intFreeMem & "</td></tr>" 
            End If 
            strHtm = strHtm & "</table>" 
        Next 
        dataarea.innerhtml = strHtm 
    End Sub 
    Function fnDate(utcDate) 
        strDateSeperator = "/" 
        strDay = Mid(utcDate, 7, 2) 
        strMonth = Mid(utcDate, 5, 2) 
      strYear = Left(utcDate, 4) 
        fnDate = strDay & strDateSeperator & StrMonth & strDateSeperator & strYear 
        fnDate = FormatDateTime(fnDate) 
   End Function 
    Function fnMemory(intMemory) 
        If intMemory >= 1048576 Then 
            fnMemory = round(intMemory/1048576,2) & " Gb" 
        Else 
            fnMemory = round(intMemory/1024,2) & " Mb" 
        End If 
    End Function 
</script>